package org.pet.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.persistence.Column;
import jakarta.persistence.Table;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class User {

    private Integer id;

    private String name; //用户名

    @Pattern(regexp = "^\\S{8,16}$")
    private String password;// 密码

    private String openid;//openid

    private String nickName;//昵称

    private String phone;// 电话

    @Email
    private String email;// 邮箱

    private LocalDateTime birthday;// 生日

    private String pic;// 头像

    private Integer gender;// 性别

    @JsonFormat(pattern="yyyy-MM-ddHH:mm:ss",timezone="GMT+8")
    private LocalDateTime createTime;// 创建时间

    @JsonFormat(pattern="yyyy-MM-ddHH:mm:ss",timezone="GMT+8")
    private LocalDateTime modifyTime;// 修改时间

    private Integer remove;//是否注销

    private LocalDateTime deleteTime;// 注销时间
}
